Skip to content

feat(union-types): adds support for OneOf and AnyOf#41

Merged
sufyankhanrao merged 60 commits into
mainfrom
add-type-combinator-support
Jul 24, 2023
Merged

feat(union-types): adds support for OneOf and AnyOf#41
sufyankhanrao merged 60 commits into
mainfrom
add-type-combinator-support

Conversation

@sufyankhanrao

Copy link
Copy Markdown
Collaborator

This PR adds support for union-types that are OneOf and AnyOf types. There are 4 new classes (OneOf, AnyOf, LeafType, UnionTypeContext) that are participating as generic algorithms for validating requests and responses containing union-types. You can read more about union-types from here. By using those classes, Python core library now has the handling for union types. This also adds support for the serialization of nested maps and arrays.

closes #38

sufyankhanrao and others added 26 commits May 16, 2023 16:14
…lause for deserialize method in oneOf and anyOf classes
Comment thread requirements.txt Outdated
Comment thread tests/apimatic_core/type_combinator_tests/__init__.py Outdated
Comment thread tests/apimatic_core/type_combinator_tests/test_one_of.py
asadali214
asadali214 previously approved these changes Jun 7, 2023

@asadali214 asadali214 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes looks good to me, I have only added 2 questions

MaryamAdnan3 added 2 commits June 8, 2023 07:20
…atic/core-lib-python into add-type-combinator-support

# Conflicts:
#	tests/apimatic_core/type_combinator_tests/test_one_of.py
Comment thread apimatic_core/authentication/multiple/auth_group.py
Comment thread apimatic_core/request_builder.py
Comment thread apimatic_core/types/union_types/any_of.py Outdated
Comment thread apimatic_core/types/union_types/union_type_context.py
Comment thread apimatic_core/utilities/datetime_helper.py Outdated
Comment thread apimatic_core/types/union_types/__init__.py Outdated
MaryamAdnan3
MaryamAdnan3 previously approved these changes Jun 9, 2023

@MaryamAdnan3 MaryamAdnan3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asadali214 asadali214 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM

@sufyankhanrao sufyankhanrao merged commit 89b3f40 into main Jul 24, 2023
@sufyankhanrao sufyankhanrao deleted the add-type-combinator-support branch July 24, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for OneOf & AnyOf

4 participants